public class FootprintFilter extends Object
EventLogEditor
.
Every EventLogEditor
has an object of this class that
implements its personal filter. When the content of the editor
gets analysed, this filter is used during analysis.
This class records the user's choices on the FilterPanel
and
save them as default filter selections for its editor owner.
The user can modify the EventLogEditor
filter selections
using the FilterPanel
, shown by the View for this purpose.
The filter can save this user's selections to give them back to the analysis
process: the minimum number of occurrence for a trace to be considered for the analysis,
the list of registered classifiers for the EventLogEditor
content, the selected
classifier from the list to be used for the analysis, the possible start events and end events
and the ones selected to be considered during the analysis (if a trace starts or ends with an
event not included in this selection, the trace gets discarded).
EventLogEditor
Modifier and Type | Field and Description |
---|---|
private Collection<XEventClassifier> |
classifiers
The
Collection of XEventClassifier
representing the list of registered classifiers for the
EventLogEditor content. |
private boolean |
complete
This variable shows the state of the filter.
|
private HashMap<String,Boolean> |
endEvents
This map contains all the possible end events (recorded by
name) for the considered log and an associated boolean value
that represents if the end event has been selected or not
for the analysis.
|
private int |
minTraceOccurrences
The minimum number of occurrences that a trace needs to
have to be considered during the analysis.
|
private XEventClassifier |
selectedClassifier
The
XEventClassifier selected for the analysis. |
private HashMap<String,Boolean> |
startEvents
This map contains all the possible start events (recorded by
name) for the considered log and an associated boolean value
that represents if the start event has been selected or not
for the analysis.
|
Constructor and Description |
---|
FootprintFilter()
Creates a
FootprintFilter with default values
(an incomplete filter with the value of minTraceOccurrences
set as 1 and all the others as null ). |
Modifier and Type | Method and Description |
---|---|
Collection<XEventClassifier> |
getClassifiers()
Returns the
Collection of the registered XEventClassifier for the associated log. |
HashMap<String,Boolean> |
getEndEvents()
Returns the
HashMap containing all the possible end events
(recorded by name) for the considered log with an associated boolean value that represents
if the end event has been selected or not for the analysis. |
int |
getMinTraceOccurrences()
Returns the minimum number of occurrence for a trace to be considered during the analysis.
|
XEventClassifier |
getSelectedClassifier()
Returns the
XEventClassifier selected for the log analysis. |
HashMap<String,Boolean> |
getStartEvents()
Returns the
HashMap containing all the possible start events
(recorded by name) for the considered log with an associated boolean value that represents
if the start event has been selected or not for the analysis. |
boolean |
isComplete()
|
void |
reset()
Resets the filter, keeping the
minTraceOccurrences value
and removing all the others. |
private void |
setClassifiers(Collection<XEventClassifier> classifiers)
Sets the
Collection of the registered XEventClassifier for the associated log. |
private void |
setComplete(boolean complete)
Sets the filter as complete or incomplete, depending on the value the passed parameter,
modifying the value of the
complete variable. |
private void |
setEndEvents(HashMap<String,Boolean> endEvents)
Sets the
HashMap containing all the possible end events
(recorded by name) for the considered log with an associated boolean value that represents
if the end event has been selected or not for the analysis. |
private void |
setMinTraceOccurrences(int minTraceOccurrences)
Sets the minimum number of occurrence for a trace to be considered during the analysis.
|
private void |
setSelectedClassifier(XEventClassifier selectedClassifier)
Sets the
XEventClassifier to use for the log analysis. |
private void |
setStartEvents(HashMap<String,Boolean> startEvents)
Sets the
HashMap containing all the possible start events
(recorded by name) for the considered log with an associated boolean value that represents
if the start event has been selected or not for the analysis. |
void |
update(int minTraceOccurrences,
Collection<XEventClassifier> classifiers,
XEventClassifier selectedClassifier,
HashMap<String,Boolean> startEvents,
HashMap<String,Boolean> endEvents)
Updates the filter variables with the passed parameters.
|
private boolean complete
If the filter has been updated with all the requested
information, the value will be true
. At the
beginning, when created, since the filter gets updated
or until it has incomplete information, the value is
false
.
private int minTraceOccurrences
private Collection<XEventClassifier> classifiers
Collection
of XEventClassifier
representing the list of registered classifiers for the
EventLogEditor
content.XEventClassifier
,
EventLogEditor
private XEventClassifier selectedClassifier
XEventClassifier
selected for the analysis.XEventClassifier
private HashMap<String,Boolean> startEvents
public FootprintFilter()
FootprintFilter
with default values
(an incomplete filter with the value of minTraceOccurrences
set as 1 and all the others as null
).public void update(int minTraceOccurrences, Collection<XEventClassifier> classifiers, XEventClassifier selectedClassifier, HashMap<String,Boolean> startEvents, HashMap<String,Boolean> endEvents)
If one or more passed values are null
, the filter
will be set as incomplete, otherwise if all the passed parameters have
valid values, the filter will be set as complete.
minTraceOccurrences
- the minimum number of occurrences for a trace to be considered during the analysisclassifiers
- the Collection
of XEventClassifier
representing the list of registered classifiers for the considered logselectedClassifier
- the XEventClassifier
selected for the log analysisstartEvents
- the HashMap
containing all the possible start events (recorded by name) for the considered log
and an associated boolean value that represents if the start event has been selected or not for the analysisendEvents
- the HashMap
containing all the possible end events (recorded by name) for the considered log
and an associated boolean value that represents if the end event has been selected or not for the analysispublic void reset()
minTraceOccurrences
value
and removing all the others.
This method restores the filter to its incomplete status, without
the calculated values from the analysis.public boolean isComplete()
true
if the filter is complete, false
otherwise.private void setComplete(boolean complete)
complete
variable.complete
- true
to set the filter as complete, false
otherwisepublic int getMinTraceOccurrences()
private void setMinTraceOccurrences(int minTraceOccurrences)
If the passed value is lower than 1, the method use a value equal to 1.
minTraceOccurrences
- the minimum number of occurrence for a trace to be considered during the analysispublic Collection<XEventClassifier> getClassifiers()
Collection
of the registered XEventClassifier
for the associated log.Collection
of the registered XEventClassifier
for the considered log.private void setClassifiers(Collection<XEventClassifier> classifiers)
Collection
of the registered XEventClassifier
for the associated log.
If the passed value is null
, this method sets the filter as not complete
.
classifiers
- the Collection
of the registered XEventClassifier
for the considered logpublic XEventClassifier getSelectedClassifier()
XEventClassifier
selected for the log analysis.XEventClassifier
selected for the log analysis.private void setSelectedClassifier(XEventClassifier selectedClassifier)
XEventClassifier
to use for the log analysis.
If the passed value is null
, this method sets the filter as not complete
.
selectedClassifier
- the XEventClassifier
to use for the log analysispublic HashMap<String,Boolean> getStartEvents()
HashMap
containing all the possible start events
(recorded by name) for the considered log with an associated boolean value that represents
if the start event has been selected or not for the analysis.HashMap
containing all the possible start events (recorded by name) and an associated boolean value that represents the possible selection.private void setStartEvents(HashMap<String,Boolean> startEvents)
HashMap
containing all the possible start events
(recorded by name) for the considered log with an associated boolean value that represents
if the start event has been selected or not for the analysis.
If the passed value is null
, this method sets the filter as not complete
.
startEvents
- the HashMap
containing all the possible start events (recorded by name) and an associated boolean value that represents the possible selectionpublic HashMap<String,Boolean> getEndEvents()
HashMap
containing all the possible end events
(recorded by name) for the considered log with an associated boolean value that represents
if the end event has been selected or not for the analysis.HashMap
containing all the possible end events (recorded by name) and an associated boolean value that represents the possible selection.private void setEndEvents(HashMap<String,Boolean> endEvents)
HashMap
containing all the possible end events
(recorded by name) for the considered log with an associated boolean value that represents
if the end event has been selected or not for the analysis.
If the passed value is null
, this method sets the filter as not complete
.
endEvents
- the HashMap
containing all the possible end events (recorded by name) and an associated boolean value that represents the possible selection